import { request } from "./request"
import qs from "qs"

// 游记列表
export const ApiQuery = (params) => request(`/travels/query`, params, null, "GET")

// 登录接口
export const ApiLogin = (params) => request("/users/login", params, null, "POST")

// 检查手机号是否注册
export const ApiCheckPhone = (params) => request(`/users/checkPhone`, params, null, "GET")

// 用户注册
export const ApiRegister = (params) => request('/users/regist', params, null, "POST")

// 热门地区
export const ApiHotRegion = () => request('/destinations/hotRegion', null, null, "GET")

// 查询地区内的目的地
export const ApiHotSearch = (params) => request('/destinations/search', params, null, "GET")

// 攻略主题
export const ApiThemes = () => request('/strategies/themes', null, null, "GET")

// 攻略列表
export const ApiThemesList = (params) => request('/strategies/query', params, null, "GET")

// 攻略详情
export const ApiStrategiesDetail = (params) => request('/strategies/detail', params, null, "GET")

// 查询评论
export const ApiComments = (params) => request('/strategies/comments', params, null, "GET")

// 添加评论
export const ApiAddComment = (params) => request('/strategies/addComment', null, qs.stringify(params), "POST")

// 游记列表
export const ApiTravelsQuery = (params) => request('/travels/query', params, null, "GET")

// 游记详情
export const ApiTravelsDetail = (params) => request('/travels/detail', params, null, "GET")

